home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 3837 < prev    next >
Encoding:
Text File  |  1996-08-05  |  1.8 KB  |  61 lines

  1. Path: airdmhor.gen.nz!brage
  2. From: brage@I_should_put_my_domain_in_etc_NNTP_INEWS_DOMAIN (Aaron Hicks)
  3. Newsgroups: comp.lang.c
  4. Subject: SVGALib and C++.
  5. Date: 31 Jan 1996 12:54:15 GMT
  6. Organization: Airdmhor
  7. Message-ID: <4enopn$56q@airdmhor.gen.nz>
  8. NNTP-Posting-Host: airdmhor.gen.nz
  9. X-Newsreader: TIN [version 1.2 PL2]
  10.  
  11. Okay, now I've just been poking about with G++ on Linux, and using the
  12. SVGAlib with the Nov1995 release of Linux. It's slow, and I can't see why,
  13. I'm writing an from an array (I suspect that an array is the problem...) to
  14. the virtual memory, as described in the README, using both vga.h and
  15. vgagl.h. On a 640x480x256 screen, I'm only getting one frame per second.
  16.  
  17. This is odd, as the computer is a DX4100 with 16MB of RAM, with a PCI
  18. Diamond Stealth 64 Video VRAM with 2MB of memory. I've set up scga.config
  19. accordind to README.config, and README.S3.
  20.  
  21. I suppose I should try a different storage object for the world, but I'm
  22. sort of lost to what to use. The object is of a fixed size (ie 640x480 by
  23. the object dbit which is...
  24.  
  25. class dbit {
  26.     int terra,aqua,aura,ether;
  27. public:
  28.     void assortedfunctions();
  29.     int colour();
  30.     };
  31.  
  32. ,which shouln't be too big)
  33.  
  34. and currently the world is stored in
  35.  
  36. class world {
  37.     dbit maploc[639][479];
  38. public :
  39.     void show();
  40.     void you_get_the_idea();
  41. };
  42.  
  43. which is plotted by
  44. void world::show()
  45. {
  46.     for(y=0;y<=479;y++){
  47.         for(x=0;x<=639;y++)
  48.             gl_setpixel(x,y,maploc[x][y].colour);
  49.         };
  50. };
  51.  
  52. Suggestions?
  53.  
  54. --
  55. ###################################################################
  56. # A message from Bloodrage, (brage@airdmhor.gen.nz), the home of  #
  57. # MegaBBS and Realms of Insanity BBS. Christchurch, New Zealand.  #
  58. #                    The truth is out there.                      #
  59. ###################################################################
  60.  
  61.